export { }

function Window() {
  //
}
Window.prototype.hello = function () {
  console.log('hello')
}

const createInstance = (function () {
  let instance: Window
  return function () {
    if (!instance) {
      instance = new (Window as any)()
    }
    return instance
  }
})()

const window1 = createInstance()
const window2 = createInstance()

console.log(window1 === window2)
